Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #38037 - Update last login time for External Auth user #10387

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

hao-yu
Copy link
Member

@hao-yu hao-yu commented Nov 26, 2024

This bug1 has been reported previously in Satellite 6.2 and fixed in Satellite 6.3

 [1] https://bugzilla.redhat.com/show_bug.cgi?id=1460963

Later on it broke again by the PR below 5 years ago:

https://github.com/theforeman/foreman/pull/7155/files#diff-cfdccd0a9d5df5a43aaad2a35d36ebbe187c52ad5fdc9846fa189d04537adb6eL201

@sjha4
Copy link
Contributor

sjha4 commented Dec 4, 2024

The code looks logical to me as in calling the post_login method before redirecting.. I took some help from QE to test it and am not sure if the issue is reproducible though.

@vsedmik
Copy link

vsedmik commented Dec 12, 2024

I'm not sure if I completely understand the issue here, but looking at the fix it seems @hao-yu is just moving the user.post_successful_login from extlogin to login_user(user). So is the issue we are trying to solve here the Last login time not being updated when we log in via WebUI using the AD credentials? Because when I log in using kinit the Last login time gets updated just ok (~ I could not reproduce the issue).

Also I wonder if we need to keep user.post_successful_login at both places to get the time updated no matter how we log in (via kinit or WebUI) or if keeping it only in login_user(user) works just fine for both?

I'm sorry for my ignorance, not an expert here, I just got somehow curious about this one.

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants